<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
 插件菜单
*/
defined('BY_JYA') or exit('error');
list($basicname)=$arguments;
// 是主应用时的菜单
// 辅助应用时的菜单
$menus2=array(
	array(
	'title'=>'应用','isplugin'=>0,'icon'=>'fa-users','url'=>'index/','child'=>array(
		array('title'=>'砍价概况','child'=>array(
			array('url'=>'jy_bargain/index//basicname='.$basicname,'title'=>'砍价概况'),
			
			array('url'=>'jy_bargain/basic.module_home/cover/ac=index&type=3','title'=>'砍价入口'),
		)),
		array('title'=>'砍价管理','child'=>array(
			array('url'=>'list/','title'=>'活动列表'),
			array('url'=>'setting/','title'=>'基本设置'),
		)),
	))
);

// 小应用可以不设置主菜单
if(empty($basicname)){
	$menus =$menus1?$menus1:$menus2;
	return $menus ;
}else{
	if (method_exists($this->plugin($basicname),'getmenus')){
		$basicmens = $this->plugin($basicname)->getmenus();
		if(!empty($basicmens)){
			foreach($basicmens as &$v){
				if($v['isplugin'] == 1){
					$v=$menus2[0];
				}
			}
		}
		return $basicmens;
	}
}

